/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class RegionDetachedCriteria extends AbstractORMDetachedCriteria {
	public final StringExpression re_numeroregion;
	public final StringExpression re_nombreRegion;
	
	public RegionDetachedCriteria() {
		super(orm.Region.class, orm.RegionCriteria.class);
		re_numeroregion = new StringExpression("re_numeroregion", this.getDetachedCriteria());
		re_nombreRegion = new StringExpression("re_nombreRegion", this.getDetachedCriteria());
	}
	
	public RegionDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.RegionCriteria.class);
		re_numeroregion = new StringExpression("re_numeroregion", this.getDetachedCriteria());
		re_nombreRegion = new StringExpression("re_nombreRegion", this.getDetachedCriteria());
	}
	
	public EvaluacionDetachedCriteria createEvaluacionCriteria() {
		return new EvaluacionDetachedCriteria(createCriteria("ORM_Evaluacion"));
	}
	
	public ComunaDetachedCriteria createComunaCriteria() {
		return new ComunaDetachedCriteria(createCriteria("ORM_Comuna"));
	}
	
	public Region uniqueRegion(PersistentSession session) {
		return (Region) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Region[] listRegion(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Region[]) list.toArray(new Region[list.size()]);
	}
}

